package perso.marcr.lst;

import perso.marcr.lst.launcher.CmdLine;
import perso.marcr.lst.launcher.EmbeddedJettyServer;

public class Main {

	
	public static void main(String[] args) throws Exception
    {
		//System.out.println("Home directory: " + GlobalParameters.getHomeDirectory());
		//GlobalParameters.initHomeDirectory();
		
		if(CmdLine.load(args) && CmdLine.bUseCmdLine)
		{
			/*
			double sizeToCopy = CmdLine.sizeToCopy;

			String reportFile = Date.getNow()+"-"+CmdLine.reportLabel+".csv";
			boolean bKeepTestFiles = CmdLine.bKeepTestFiles;

			Csv csv = new Csv(reportFile, true);
			Result result = null;
			
			result = Scenario.scenarioBig(result, CmdLine.directory,  sizeToCopy, bKeepTestFiles);
			csv.print(result.getListAverage());
			result = Scenario.scenarioAverage(result, CmdLine.directory,  sizeToCopy, bKeepTestFiles);
			csv.print(result.getListAverage());
			result = Scenario.scenarioSmall(result, CmdLine.directory,  sizeToCopy, bKeepTestFiles);
			csv.print(result.getListAverage());
			result = Scenario.scenarioVerySmall(result, CmdLine.directory,  sizeToCopy, bKeepTestFiles);
			csv.print(result.getListAverage());
			
			csv.close();
			*/
			System.out.println("Please execute jetty.");
		}
		else
		{
			System.out.println("launch jetty");
			EmbeddedJettyServer.start();
		}
    }
}
